package cn.edu.cug.cs.gtl.apis.ui;

import cn.edu.cug.cs.gtl.apis.ui.devicetree.DeviceTree;

import javax.swing.*;
import java.awt.*;

public class DevicePanel extends JPanel {

    AbstractApplication theApp;

    DeviceTree tree=null;

    public DevicePanel(LayoutManager layout, boolean isDoubleBuffered) {
        super(layout, isDoubleBuffered);
    }

    public DevicePanel(LayoutManager layout) {
        super(layout);
    }

    public DevicePanel(boolean isDoubleBuffered) {
        super(isDoubleBuffered);
    }

    public DevicePanel(AbstractApplication theApp) {
        this.theApp = theApp;
        setLayout(new BorderLayout());
        this.tree = DeviceTree.create(theApp);
        add(tree,BorderLayout.CENTER);
    }

    public DeviceTree getTreeComponent() {
        return tree;
    }
}
